package com.last.controller;

import com.last.config.UploadPic;
import com.last.entity.*;
import com.last.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private OrderService orderService;
    @Autowired
    private UploadPic uploadPic;
    @PostMapping("/listOrder")
    public PageResult<Order> listOrder(@RequestBody PageDTO<Order> pageDTO){
        return orderService.listAllOrder(pageDTO);
    }
}
